//
// Statistics.h
//


#if !defined(AFX_STATISTICS_H__58CE4F23_CE39_4AAF_B3DE_1A77B801D9AC__INCLUDED_)
#define AFX_STATISTICS_H__58CE4F23_CE39_4AAF_B3DE_1A77B801D9AC__INCLUDED_

#pragma once


class CStatistics  
{
// Construction
public:
	CStatistics();
	virtual ~CStatistics();

// Attributes
public:
	struct
	{
		struct
		{
			QWORD	Connected;
			QWORD	Hub;
		} Timer;

		struct
		{
			QWORD	Outgoing;
			QWORD	Incoming;
		} Connections;

		struct
		{
			QWORD	Outgoing;
			QWORD	Incoming;
		} Bandwidth;
		
		struct
		{
			QWORD	Files;
			QWORD	Volume;
		} Uploads;

		struct
		{
			QWORD	Outgoing;
			QWORD	Incoming;
			QWORD	Routed;
			QWORD	Dropped;
			QWORD	Lost;
			QWORD	Queries;
		} Gnutella1, Gnutella2;

	}
	Ever, Today, Last, Current;

	DWORD	m_tUpdate;
	DWORD	m_tSeconds;

// Operations
public:
	void	Update();
protected:
	static void Add(LPVOID pTarget, LPCVOID pSource, int nCount);

};

extern CStatistics Statistics;

#endif // !defined(AFX_STATISTICS_H__58CE4F23_CE39_4AAF_B3DE_1A77B801D9AC__INCLUDED_)
